package top.codedance.iotp.client.manage.net.configuration;

import top.codedance.iotp.client.manage.net.handler.taskHandler.DownloadExecuterImpl;
import top.codedance.iotp.client.manage.net.handler.entity.TaskExecuterRegistEntity;
import top.codedance.iotp.client.manage.net.handler.taskHandler.LoadExecuterImpl;
import top.codedance.iotp.client.manage.net.handler.taskHandler.UpdateExecuterImpl;
import top.codedance.iotp.common.constent.Command;
import top.codedance.iotp.common.entity.CommandTeam;

import java.util.ArrayList;
import java.util.List;

public class ExecuterRegistConfig {
    /**
     * 同步执行器配置
     * @return
     */
    public static List<TaskExecuterRegistEntity> getSyscExecuters(){
        List<TaskExecuterRegistEntity> executers = new ArrayList<>();
        executers.add(new TaskExecuterRegistEntity("upgrade", new CommandTeam(Command.UPGRADE, Command.UPGRADE_RECEIVE), new UpdateExecuterImpl()));
        executers.add(new TaskExecuterRegistEntity("download", new CommandTeam(Command.DOWNLOAD, Command.DOWNLOAD_RECEIVE), new DownloadExecuterImpl()));
        executers.add(new TaskExecuterRegistEntity("load", new CommandTeam(Command.GET_LOAD, Command.GET_LOAD_RECEIVE), new LoadExecuterImpl()));
        return executers;
    }
}
